package Controls
{
	import Objects.GameSprite;

	public class Page extends GameSprite
	{
		public var callBack:Function;
		public var total:int;
		protected var page:int=0;
		public function Page()
		{
			super();
			intelligent=true;
		}
		public final function change(value:int):void
		{
			if(value<1)return;
			if(value>total)return;
			if(page==value)return;
			page=value;
			if(callBack)
			{
				callBack(page);
			}
			_change();
		}
		protected function _change():void
		{
			
		}
	}
}